home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / misc / amag / AM94122.lha / Monitor-Tuning / MPatch_MonitorInfo / mpatch.doc < prev    next >
Encoding:
Text File  |  1994-08-25  |  13.0 KB  |  284 lines

  1. MPATCH - The Monitor Patch Utility, V37.9
  2. =========================================
  3.  
  4. WHY MPATCH?
  5. -----------
  6.  
  7. Some time ago, I upgraded my old A2000 with the latest Denise revision
  8. since I do a lot of writing and DTP on my AMIGA, and that 50 Hz PAL
  9. display started to hurt my eyes. The MULTISCAN mode was better, but
  10. my C1960 monitor seemed to have problems sync'ing on the 60 Hz signal:
  11. the picture was always stretched vertically, so I had to switch to
  12. MANUAL and adjust the vertical size manually. However, the PAL mode
  13. was then squeezed vertically, resulting in a very odd aspect ratio; so
  14. I had to switch from MANUAL to AUTO and back every time a program
  15. came up with a PAL screen.
  16. The EURO72 mode introduced with V38 was a bit better but its 640 x 400
  17. screen tended to become quite crowded once I had one or two CLI windows 
  18. and the SE window open on it. Also some older software, like the famous
  19. PowerPacker, would always open a 60 Hz Productivity screen - so it had
  20. to be Multiscan (and switching manually) again.
  21.  
  22. Then, one day, I scanned my C include files in search of some struct
  23. definition, and came across the monitor.h file, spotted the word
  24. VSYNCTRUE somewhere, and the rest was history. I had already toyed with
  25. various sync settings on a graphics card, and so I knew that some
  26. monitors (like the C1960) use the polarity of the sync signals to
  27. determine the aspect of the video signals they receive. I just had no
  28. idea that the ECS chipset supports positive sync signals as well.
  29.  
  30. All I had to do is to find out where the BeamCon0 values are stored,
  31. and then write this small program. As I tested it, I found some
  32. other goodies to include, and so MPATCH grew ...
  33.  
  34.  
  35.  
  36. USAGE
  37. -----
  38.  
  39. MPATCH can only be run from the CLI or Shell.
  40.  
  41. MPATCH <monitor-name> [HSYNCTRUE][VSYNCTRUE][SYNCTRUE][HSYNCFALSE]
  42.          [VSYNCFALSE][SYNCFALSE][LOLDIS][HSYNCDELAY <delay>]
  43.          [VSYNCDELAY <delay>][HSYNCLEN <len>][VSYNCLEN <len>]
  44.                
  45. <monitor-name> is the name of the monitor to be patched, e.g.
  46.    "multiscan.monitor" or just "multiscan". Upper/lowercase is important.
  47.    V37 (2.0) and V38 (2.1) monitor names are all in lower case; the new
  48.    modes introduced with V39 (3.0), however, are mixed case. You must type
  49.    "DoublePAL" or "DoubleNTSC" in order that these names be recognized.
  50.  
  51. HSYNCTRUE - changes the horizontal sync signal's polarity to positive,
  52.    or "true" (1) logical level. By default, all monitors have their syncs
  53.    set to negative, or "false" (0) logical level.
  54.    
  55. VSYNCTRUE - changes the vertical sync signal's polarity to positive,
  56.    or "true" (1) logical level. By default, all monitors have their syncs
  57.    set to negative, or "false" (0) logical level.
  58.    
  59. SYNCTRUE - this is just a shortcut for HSYNCTRUE VSYNCTRUE; so if you
  60.    specify SYNCTRUE, both syncs are switched to "true" (see above for
  61.    details)
  62.    
  63. HSYNCFALSE, VSYNCFALSE, SYNCFALSE - these are the counterparts to the
  64.    ...SYNCTRUE switches listed above. The horizontal, vertical, or
  65.    both sync signals are set to "active low", which is the default for
  66.    all monitors from V37 (V2.04) to V39 (V3.0) of the AMIGA OS.
  67.    
  68. LOLDIS - means "LOng LIne DISable". On the "non-native" video mode (PAL
  69.    on NTSC machines, NTSC on PAL machines), every second scanline is a
  70.    "long line" due to DMA timing restrictions.
  71.    (The exact length of a PAL video scanline would be 227.5 DMA cycles 
  72.    per line. Since 0.5 cycles are impossible for the hardware, every 
  73.    second scanline is displayed with a length of 228 cycles, hence the
  74.    name "long line").
  75.    This flag is set by default for all nonstandard ("VGA") modes.
  76.    It should be set for the NTSC mode on PAL AMIGAs as well, at least
  77.    if you are using "BBlank" or a similar utility that enables border
  78.    blanking; otherwise the right border might look a bit wobbly.
  79.  
  80. The following options can only be used with VGA/Multiscan modes, and will
  81. be ignored if used with the PAL or NTSC modes.
  82. The <delay> and <len> values for HSYNCDELAY and HSYNCLEN all in 280 ns
  83. "ticks" (the exact interval depends on whether you are using a PAL or
  84. NTSC machine.)
  85.  
  86. NOTE for users of versions V37.7 and below! The behaviour of the HSYNCDELAY
  87. and VSYNCDELAY options has been changed damatically. The <delay> value is
  88. now an absolute offset from the start of the blanking interval rather than
  89. relative to the current settings. Negative values are no longer allowed. Do
  90. not install this version (V37.9) if the old version produced good results.
  91. There is absolutely no point in doing so, just a lot of extra work.
  92. NOTE: Do not use any of these keywords if you have installed AmigaOS 3.1,
  93. as this release has the ability to adjust the image position built into
  94. the Overscan editor.
  95.  
  96. HSYNCDELAY <delay> - Modifies the position of the horizontal sync pulse in
  97.    the horizontal blanking period.
  98.    The <delay> is an offset from the start of the horizontal blanking period,
  99.    and must lie between 0 and 18. If you specify a value that is out of range,
  100.    reasonable default settings are used instead.
  101.  
  102. HSYNCLEN <len> - specifies the width of the horizontal sync pulse.
  103.    Reasonable values are between 2 and 20; the default value for most
  104.    monitor definitions is 14 which gives a sync pulse width of approx.
  105.    4 microseconds. Most monitors, even older ones, are satisfied with
  106.    1 microsecond, <len> value of 4.
  107.    
  108. VSYNCDELAY <delay> - Modifies the position of the sync pulse in the
  109.    vertical blanking period.
  110.    The <delay> is an offset from the start of the vertical blanking period
  111.    in scanlines, and must lie between 0 and 20; the actual maximum depends
  112.    on the monitor definition and the VSYNCLEN setting.
  113.  
  114. VSYNCLEN <len> - specifies the length of the vertical sync pulse. <len>
  115.    is in scanlines. Reasonable values are between 2 and 10. If you specify
  116.    a value that is out of range, MPATCH will use a safe default value.
  117.  
  118. The MPATCH command will most likely find a place in your startup-sequence
  119. or user-startup file. It MUST be inserted after the monitor definitions
  120. have been added to the system's database; I recommend putting it somewhere
  121. at the top of your user-startup file, before any output is made to the
  122. console window, so changes to the workbench screen's monitor are effective
  123. before the workbench screen is opened.
  124.  
  125.  
  126.  
  127. HOW TO FIND THE CORRECT SETTINGS FOR YOUR MONITOR
  128. -------------------------------------------------
  129.  
  130. Before you start patching around, you should select your "default" display
  131. mode and adjust the monitor's controls so that it fills most of the screen
  132. and is centered horizontally and vertically. If you own a monitor that has
  133. a ADD/NOR switch (might also be labeled differently on your monitor, so 
  134. consult your manual), set it to ADD (or whatever it is labeled). Such 
  135. switches are found on the C1960 and some older VGA/SVGA multiscans.
  136. If your monitor supports PAL or NTSC display, use one of these modes to
  137. adjust the picture position, since it is not possible to adjust the position
  138. of any video mode with MPATCH.
  139. DO NOT TOUCH any of the monitor's controls afterwards - you won't need to 
  140. anyway. (Close the small trapdoor if the monitor has one!)
  141.  
  142. Now, open a shell window and invoke the Overscan Preferences editor. Select
  143. the monitor you wish to patch. Click on the "Set Text Overscan" gadget.
  144. Note to which direction the display is offset. Note whether it appears
  145. vertically stretched or squeezed. Click "Cancel" (or press <ESCAPE>), and
  146. activate your shell window. Now type: "mpatch <monitor_name>", where
  147. <monitor_name> is the name of the monitor you selected in the Overscan
  148. editor. Add one or more switches following the guidelines below:
  149.  
  150. * If a mode appears stretched vertically (on my C1960, the MultiScan mode
  151.    used to behave this way), try the SYNCTRUE option. (Remember, this
  152.    option sets both the vertical and horizontal syncs to TRUE).
  153.  
  154. * If a mode appears squeezed vertically, try the VSYNCTRUE option.
  155.  
  156. * If a mode is too far to the right or to the left, try the HSYNCDELAY
  157.    option.
  158.  
  159. * If the right border appears to be somewhat instable, try the LOLDIS
  160.    switch.
  161.  
  162. Press <ENTER> and go back to the Overscan editor. Click "Set Text Overscan"
  163. again. The display should now be somewhat different. If you are satisfied,
  164. note all the switches you set and add a line at the top(!) of your
  165. "S:user-startup" file. If you wish to patch your workbench screen's monitor
  166. as well, you *MUST* insert the MPATCH command before any text is printed
  167. to the console window, or the changes will not affect the workbench screen.
  168.  
  169. Repeat the above steps for all monitors you wish to patch.
  170.  
  171.  
  172.  
  173. TECHNICAL DETAILS (for those who are really interested!)
  174. --------------------------------------------------------
  175.  
  176. A) SYNC POLARITY
  177. ----------------
  178.  
  179. Some monitors, especially the C1960 and most VGA Multiscans, use the
  180. polarity of the sync signals to determine the aspect of the picture they
  181. are displaying. The term "polarity", although frequently used in this
  182. context, is not fully accurate, because the sync signals are always standard
  183. TTL level (+5V) signals. A better description would be "active-low" and
  184. "active-high". By default, the sync signals are "active-low", meaning that
  185. the sync lines are always on high (or logical "1") level and go to low (or
  186. logical "0") level only at the end of a scan line (HSYNC) or frame (VSYNC).
  187. Setting HSYNCTRUE or VSYNCTRUE reverses this behaviour. Now the lines are
  188. by default on low level and go to high level only at the end of a scan line
  189. or frame.
  190. There are 4 possible combinations of sync polarity:
  191. HSYNC NEG, VSYNC NEG - standard setting
  192. HSYNC NEG, VSYNC POS - stretches the picture vertically (all modes)
  193. HSYNC POS, VSYNC NEG - ??? (no result on my monitor)
  194. HSYNC POS, VSYNC POS - squeezes display vertically (VGA/SVGA modes only)
  195.  
  196. NOTE that this behaviour applies to the C1960 monitor. Your monitor might
  197. show a completely different behaviour or no reaction at all.
  198. UPDATE: The MicroVitec 1438 shows a similar behaviour.
  199.  
  200. B) SYNC DELAY AND PERIOD
  201. ------------------------
  202.  
  203. The HORIZONTAL blanking period starts at the end of each scan line and must
  204. be long enough for the beam to reach the left border before any data is
  205. being displayed. The horizontal sync signal must occur somewhere within this
  206. period. The "beam return" starts with the end of the sync pulse. Hence, the
  207. later the sync pulse occurs within the blanking interval, the more the 
  208. picture will start to the left. NOTE that the sync/blanking counters are 
  209. independent of display data fetch which is controlled by other register
  210. values, so it may well be possible to start scan line display before the beam
  211. has reached its leftmost position. MPATCH will not allow you to do so.
  212.  
  213. The VERTICAL blanking period starts at the bottom of the frame and must be
  214. long enough for the beam to reach the top of the screen. The vertical sync
  215. signal must occur somewhere within this interval, and must be at least one
  216. scanline long in order to be recognized as a vertical sync signal by the 
  217. monitor. The "beam return" starts with the end of the sync pulse. By
  218. modifying the position of the sync pulse within the vertical blanking
  219. interval it is possible to adjust the vertical picture position by a few
  220. scan lines. Specifying a positive delay will make the picture appear
  221. "higher", while specifying a negative delay will make the picture appear
  222. "lower". However, specifying a delay that is too great will result in a
  223. partially invisible display, as the beam needs some time to reach the top
  224. of the screen.
  225.  
  226.  
  227.  
  228. LEGAL STUFF:
  229. ------------
  230.  
  231. This software is provided "as-is". No warranties are made. All use is at
  232. the user's own risk. The author assumes no liability for any incidential or
  233. consequential damage to your equipment, physical or mental health resulting
  234. from the use of this product.
  235.  
  236. This software and its documentation are freely distributable but remain
  237. Copyright (c) Gregor S. M. Kuhlmann.
  238.  
  239. TERMS OF DISTRIBUTION:
  240.  
  241. §1 All files, especially the copyright notices, must be left intact.
  242.  
  243. §2 No more than a reasonable fee to cover copying, media and mailing costs
  244. should be charged.
  245.  
  246. §3 Inclusion of the software on PD Collections and magazine coverdisks is 
  247. expressly encouraged. In both cases, I would like to receive a free copy
  248. of the collection or magazine (including disks). However, this is not 
  249. mandatory.
  250.  
  251.  
  252.  
  253. BUGS, COMMENTS, SUGGESTIONS:
  254. ----------------------------
  255.  
  256. MPatch has been successfully tested on an A2000 with ECS chipset,
  257. Kick/WB 3.0, 1 MB of chip memory and 9 MB of 32-Bit memory on my 
  258. GVP GForce 030/25 board, and on a stock A1200 with nothing installed
  259. except a clock module, with a C1960 monitor attached to both of them.
  260. If you encounter any problems with MPatch, have some reasonable suggestions
  261. for improvements or find the program useful enough to send any money, feel
  262. free to write to the following address.
  263. You are also invited to contact me if you want to swap Japanese comic books,
  264. ANIME videotapes (Manga and others, VHS PAL only) or ANIME slide shows.
  265.  
  266. This is my private MsgPort address
  267.  
  268.    Gregor S. M. Kuhlmann
  269.    Friedhofsallee 4/5
  270.    A-2451 Hof am Leithaberge
  271.    AUSTRIA
  272.    EUROPE
  273.  
  274. but I can also be reached at 
  275.  
  276.    Gregor S. M. Kuhlmann
  277.    c/o Digital Sound & Vision
  278.    Kauergasse 10/2
  279.    A-1150 Wien
  280.    AUSTRIA
  281.    EUROPE
  282.  
  283. (sorry no email yet, but I'm working on it ...)
  284.